<template>
  <div>
    <h3>我是详情页面</h3>
    <button @click="goHome">回到首页</button>
  </div>
</template>

<script>
// useRoute函数用来获取路由相关信息的
// useRouter函数用来进行路由操作相关的
import { useRoute, useRouter } from 'vue-router'
export default {
  props: ['other'],
  setup(props) {
    const route = useRoute()
    const router = useRouter()

    console.log('params', route.params)
    console.log('query', route.query)
    console.log('props', props)

    const goHome = () => {
      router.push('/')
    }

    return { goHome }
  }
}
</script>

<style lang="scss" scoped></style>
